package com.cskaoyan.app.wxcontroller;

import com.cskaoyan.app.bean.common.BasePageInfo;
import com.cskaoyan.app.bean.common.BaseRespVo;
import com.cskaoyan.app.bean.common.CommonData;
import com.cskaoyan.app.bean.po.MarketBrand;
import com.cskaoyan.app.wxservice.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    private WxBrandService wxBrandService;

    @GetMapping("list")
    public Object list(BasePageInfo info) {
        CommonData<MarketBrand> data = wxBrandService.list(info);
        return BaseRespVo.ok(data);
    }

    @GetMapping("detail")
    public Object detail(Integer id) {
        MarketBrand data = wxBrandService.detail(id);
        return BaseRespVo.ok(data);
    }
}
